package org.example.orders.feign;

//该接口是为了去调用user服务器的Controller接口？该服务提供了获取用户信息的接口。

import org.example.orders.entity.User;
import org.example.orders.exception.MyFeignFallBack;
import org.example.orders.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.Serializable;

@FeignClient(value = "myusers",fallbackFactory = MyFeignFallBack.class)

public interface MyFeign {

    @GetMapping("user/{id}")
    public User getById(@PathVariable("id") Serializable id);


}
